<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: active_products.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$products_active = $db->db_query("SELECT products_id FROM ".TABLE_PRODUCTS." WHERE products_status = '1'", true);

$products_inactive = $db->db_query("SELECT products_id FROM ".TABLE_PRODUCTS." WHERE products_status = '0'", true);

$products_total = $db->db_query("SELECT products_id FROM ".TABLE_PRODUCTS, true);

$specials_active = $db->db_query("SELECT specials_id FROM ".TABLE_SPECIALS." WHERE status = '1'", true);

$specials_inactive = $db->db_query("SELECT specials_id FROM ".TABLE_SPECIALS." WHERE status = '0'", true);

$specials_total = $db->db_query("SELECT specials_id FROM ".TABLE_SPECIALS, true);

$categories_active = $db->db_query("SELECT categories_id FROM ".TABLE_CATEGORIES." WHERE categories_status = '1'", true);

$categories_inactive = $db->db_query("SELECT categories_id FROM ".TABLE_CATEGORIES." WHERE categories_status = '0'", true);

$categories_total = $db->db_query("SELECT categories_id FROM ".TABLE_CATEGORIES, true);
?>

<table width="100%" class="dataTable">
	<?php echo TEXT_WIDGET_OVERVIEW_PRODUCTS ?>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_TOTAL ?></td>
		<td align="center" width="1"><?php echo $products_total->_numOfRows ?></td>
	</tr>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_ACTIVE; ?></td>
		<td align="center"> <?php echo $products_active->_numOfRows ?></td>
	</tr>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_INACTIVE ?></td>
		<td align="center"> <?php echo $products_inactive->_numOfRows ?></td>
	</tr>
</table><br />

<table width="100%" class="dataTable">
	<?php echo TEXT_WIDGET_OVERVIEW_SPECIALS ?>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_TOTAL; ?></td>
		<td align="center" width="1"><?php echo $specials_total->_numOfRows ?></td>
	</tr>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_ACTIVE; ?></td>
		<td align="center"> <?php echo $specials_active->_numOfRows ?></td>
	</tr>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_INACTIVE; ?></td>
		<td align="center"> <?php echo $specials_inactive->_numOfRows ?></td>
	</tr>
</table><br />

<table width="100%" class="dataTable">
	<?php echo TEXT_WIDGET_OVERVIEW_CATEGORIES ?>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_TOTAL; ?></td>
		<td align="center" width="1"><?php echo $categories_total->_numOfRows ?></td>
	</tr>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_ACTIVE; ?></td>
		<td align="center"> <?php echo $categories_active->_numOfRows ?></td>
	</tr>
	<tr>
		<td><?php echo TEXT_WIDGET_OVERVIEW_INACTIVE; ?></td>
		<td align="center"> <?php echo $categories_inactive->_numOfRows ?></td>
	</tr>
</table>